def is_perfect_number(n):
    if n <= 1:
        return False
    sum_of_divisors = 0
    for i in range(1, n):
        if n % i == 0:
            sum_of_divisors += i
    return sum_of_divisors == n

start = int(input("请输入起始正整数: "))
end = int(input("请输入结束正整数: "))
count = 0
for num in range(start, end + 1):
    if is_perfect_number(num):
        count += 1
print("在", start, "和", end, "之间的完数个数为:", count)